# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Ghost of Kendo <ghostofkendo at gmail dot com>

pkgname=ispin
pkgver=6.5.0
pkgrel=2
pkgdesc='New Tcl/Tk GUI for Spin replacing xSpin'
arch=('any')
url='https://spinroot.com/'
license=('custom:SPIN')
depends=('spin>=6.0' 'tk>=8.5' 'gcc')
optdepends=('graphviz: recommended, provides dot tool for automata view'
            'curl: for version check information')
source=("https://github.com/nimble-code/Spin/archive/version-${pkgver}.tar.gz")
b2sums=('d4cd147b8d8204e9c092865e49b59426c49e225578d64818e88eed44fa3a660346dfa424315d4c55f642c00a099337aff86aea5b0cf019b9f59059b636f32250')

build() {
  cd Spin-version-${pkgver}/Src
  make
}

package() {
  cd Spin-version-${pkgver}
  install -Dm755 optional_gui/${pkgname}.tcl "${pkgdir}"/usr/bin/${pkgname}
  install -Dm644 Src/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
